Skip to content

Commit

Permalink
Release 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 19, 2023
1 parent 8c541a8 commit d1f8bd9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>org.surfnet</groupId>
<artifactId>student-mobility-inteken-ontvanger-generiek</artifactId>
<version>0.2.1-SNAPSHOT</version>
<version>0.2.2</version>
<name>inteken-ontvanger-generiek</name>
<description>inteken-ontvanger-generiek</description>

Expand Down
17 changes: 15 additions & 2 deletions src/main/java/generiek/model/EnrollmentRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

import javax.persistence.*;
import java.io.ByteArrayInputStream;
Expand All @@ -25,7 +25,6 @@
@NoArgsConstructor
@Getter
@Setter
@ToString
public class EnrollmentRequest implements Serializable {

@Id
Expand Down Expand Up @@ -96,6 +95,20 @@ public String serializeToBase64(ObjectMapper objectMapper) throws IOException {
return URLEncoder.encode(Base64.getEncoder().encodeToString(bos.toByteArray()), Charset.defaultCharset().name());
}

public String toString() {
return "EnrollmentRequest(id=" + this.getId() +
", identifier=" + this.getIdentifier() +
", personURI=" + this.getPersonURI() +
", homeInstitution=" + this.getHomeInstitution() +
", personAuth=" + this.getPersonAuth() +
", associations=" + this.getAssociations() +
", eduid=" + this.getEduid() +
", accessToken=" + StringUtils.hasText(this.getAccessToken()) +
", refreshToken=" + StringUtils.hasText(this.getRefreshToken()) +
", scope=" + this.getScope() +
", created=" + this.getCreated() + ")";
}

@SuppressWarnings("unchecked")
public static EnrollmentRequest serializeFromBase64(ObjectMapper objectMapper, String base64) throws IOException {
byte[] decoded = Base64.getDecoder().decode(URLDecoder.decode(base64, Charset.defaultCharset().name()));
Expand Down

0 comments on commit d1f8bd9

Please sign in to comment.