@Test public void testClientDetailsEntity() { Date now = new Date(); ClientDetailsEntity c = new ClientDetailsEntity(); c.setClientId("s6BhdRkqt3"); c.setClientSecret("ZJYCqe3GGRvdrudKyZS0XhGv_Z45DuKhCUk0gBR1vZk"); c.setApplicationType(ClientDetailsEntity.AppType.WEB); c.setRedirectUris(ImmutableSet.of("https: c.setClientName("My Example"); c.setLogoUri("https: c.setSubjectType(ClientDetailsEntity.SubjectType.PAIRWISE); c.setSectorIdentifierUri("https: c.setTokenEndpointAuthMethod(ClientDetailsEntity.AuthMethod.SECRET_BASIC); c.setJwksUri("https: c.setUserInfoEncryptedResponseAlg(JWEAlgorithm.RSA1_5); c.setUserInfoEncryptedResponseEnc(EncryptionMethod.A128CBC_HS256); c.setContacts(ImmutableSet.of("ve7jtb@example.org", "mary@example.org")); c.setRequestUris(ImmutableSet.of("https: c.setCreatedAt(now); c.setAccessTokenValiditySeconds(600); assertEquals("s6BhdRkqt3", c.getClientId()); assertEquals("ZJYCqe3GGRvdrudKyZS0XhGv_Z45DuKhCUk0gBR1vZk", c.getClientSecret()); assertEquals(ClientDetailsEntity.AppType.WEB, c.getApplicationType()); assertEquals(ImmutableSet.of("https: assertEquals("My Example", c.getClientName()); assertEquals("https: assertEquals(ClientDetailsEntity.SubjectType.PAIRWISE, c.getSubjectType()); assertEquals("https: assertEquals(ClientDetailsEntity.AuthMethod.SECRET_BASIC, c.getTokenEndpointAuthMethod()); assertEquals("https: assertEquals(JWEAlgorithm.RSA1_5, c.getUserInfoEncryptedResponseAlg()); assertEquals(EncryptionMethod.A128CBC_HS256, c.getUserInfoEncryptedResponseEnc()); assertEquals(ImmutableSet.of("ve7jtb@example.org", "mary@example.org"), c.getContacts()); assertEquals(ImmutableSet.of("https: assertEquals(now, c.getCreatedAt()); assertEquals(600, c.getAccessTokenValiditySeconds().intValue()); }
public ClientDetailsEntity() { }
ClientDetailsEntity implements ClientDetails { public ClientDetailsEntity() { } }
ClientDetailsEntity implements ClientDetails { public ClientDetailsEntity() { } ClientDetailsEntity(); }
ClientDetailsEntity implements ClientDetails { public ClientDetailsEntity() { } ClientDetailsEntity(); @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") Long getId(); void setId(Long id); @Basic @Column(name="client_description") String getClientDescription(); void setClientDescription(String clientDescription); @Transient boolean isAllowRefresh(); @Basic @Column(name="reuse_refresh_tokens") boolean isReuseRefreshToken(); void setReuseRefreshToken(boolean reuseRefreshToken); @Basic @Column(name="id_token_validity_seconds") Integer getIdTokenValiditySeconds(); void setIdTokenValiditySeconds(Integer idTokenValiditySeconds); @Basic @Column(name="dynamically_registered") boolean isDynamicallyRegistered(); void setDynamicallyRegistered(boolean dynamicallyRegistered); @Basic @Column(name="allow_introspection") boolean isAllowIntrospection(); void setAllowIntrospection(boolean allowIntrospection); @Override @Transient boolean isSecretRequired(); @Override @Transient boolean isScoped(); @Basic @Override @Column(name="client_id") String getClientId(); void setClientId(String clientId); @Basic @Override @Column(name="client_secret") String getClientSecret(); void setClientSecret(String clientSecret); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_scope", joinColumns=@JoinColumn(name="owner_id") ) @Override @Column(name="scope") Set<String> getScope(); void setScope(Set<String> scope); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_grant_type", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="grant_type") Set<String> getGrantTypes(); void setGrantTypes(Set<String> grantTypes); @Override Set<String> getAuthorizedGrantTypes(); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_authority", joinColumns=@JoinColumn(name="owner_id") ) @Override @Column(name="authority") Set<GrantedAuthority> getAuthorities(); void setAuthorities(Set<GrantedAuthority> authorities); @Override @Basic @Column(name="access_token_validity_seconds") Integer getAccessTokenValiditySeconds(); void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds); @Override @Basic @Column(name="refresh_token_validity_seconds") Integer getRefreshTokenValiditySeconds(); void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_redirect_uri", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="redirect_uri") Set<String> getRedirectUris(); void setRedirectUris(Set<String> redirectUris); @Override @Transient Set<String> getRegisteredRedirectUri(); @Override @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_resource", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="resource_id") Set<String> getResourceIds(); void setResourceIds(Set<String> resourceIds); @Override @Transient Map<String, Object> getAdditionalInformation(); @Enumerated(EnumType.STRING) @Column(name="application_type") AppType getApplicationType(); void setApplicationType(AppType applicationType); @Basic @Column(name="client_name") String getClientName(); void setClientName(String clientName); @Enumerated(EnumType.STRING) @Column(name="token_endpoint_auth_method") AuthMethod getTokenEndpointAuthMethod(); void setTokenEndpointAuthMethod(AuthMethod tokenEndpointAuthMethod); @Enumerated(EnumType.STRING) @Column(name="subject_type") SubjectType getSubjectType(); void setSubjectType(SubjectType subjectType); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_contact", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="contact") Set<String> getContacts(); void setContacts(Set<String> contacts); @Basic @Column(name="logo_uri") String getLogoUri(); void setLogoUri(String logoUri); @Basic @Column(name="policy_uri") String getPolicyUri(); void setPolicyUri(String policyUri); @Basic @Column(name="client_uri") String getClientUri(); void setClientUri(String clientUri); @Basic @Column(name="tos_uri") String getTosUri(); void setTosUri(String tosUri); @Basic @Column(name="jwks_uri") String getJwksUri(); void setJwksUri(String jwksUri); @Basic @Column(name="sector_identifier_uri") String getSectorIdentifierUri(); void setSectorIdentifierUri(String sectorIdentifierUri); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="request_object_signing_alg")) }) JWSAlgorithmEmbed getRequestObjectSigningAlgEmbed(); void setRequestObjectSigningAlgEmbed(JWSAlgorithmEmbed requestObjectSigningAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="user_info_signed_response_alg")) }) JWSAlgorithmEmbed getUserInfoSignedResponseAlgEmbed(); void setUserInfoSignedResponseAlgEmbed(JWSAlgorithmEmbed userInfoSignedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="user_info_encrypted_response_alg")) }) JWEAlgorithmEmbed getUserInfoEncryptedResponseAlgEmbed(); void setUserInfoEncryptedResponseAlgEmbed(JWEAlgorithmEmbed userInfoEncryptedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="user_info_encrypted_response_enc")) }) JWEEncryptionMethodEmbed getUserInfoEncryptedResponseEncEmbed(); void setUserInfoEncryptedResponseEncEmbed(JWEEncryptionMethodEmbed userInfoEncryptedResponseEnc); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="id_token_signed_response_alg")) }) JWSAlgorithmEmbed getIdTokenSignedResponseAlgEmbed(); void setIdTokenSignedResponseAlgEmbed(JWSAlgorithmEmbed idTokenSignedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="id_token_encrypted_response_alg")) }) JWEAlgorithmEmbed getIdTokenEncryptedResponseAlgEmbed(); void setIdTokenEncryptedResponseAlgEmbed(JWEAlgorithmEmbed idTokenEncryptedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="id_token_encrypted_response_enc")) }) JWEEncryptionMethodEmbed getIdTokenEncryptedResponseEncEmbed(); void setIdTokenEncryptedResponseEncEmbed(JWEEncryptionMethodEmbed idTokenEncryptedResponseEnc); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="token_endpoint_auth_signing_alg")) }) JWSAlgorithmEmbed getTokenEndpointAuthSigningAlgEmbed(); void setTokenEndpointAuthSigningAlgEmbed(JWSAlgorithmEmbed tokenEndpointAuthSigningAlgEmbed); @Transient JWSAlgorithm getRequestObjectSigningAlg(); void setRequestObjectSigningAlg(JWSAlgorithm requestObjectSigningAlg); @Transient JWSAlgorithm getUserInfoSignedResponseAlg(); void setUserInfoSignedResponseAlg(JWSAlgorithm userInfoSignedResponseAlg); @Transient JWEAlgorithm getUserInfoEncryptedResponseAlg(); void setUserInfoEncryptedResponseAlg(JWEAlgorithm userInfoEncryptedResponseAlg); @Transient EncryptionMethod getUserInfoEncryptedResponseEnc(); void setUserInfoEncryptedResponseEnc(EncryptionMethod userInfoEncryptedResponseEnc); @Transient JWSAlgorithm getIdTokenSignedResponseAlg(); void setIdTokenSignedResponseAlg(JWSAlgorithm idTokenSignedResponseAlg); @Transient JWEAlgorithm getIdTokenEncryptedResponseAlg(); void setIdTokenEncryptedResponseAlg(JWEAlgorithm idTokenEncryptedResponseAlg); @Transient EncryptionMethod getIdTokenEncryptedResponseEnc(); void setIdTokenEncryptedResponseEnc(EncryptionMethod idTokenEncryptedResponseEnc); @Transient JWSAlgorithm getTokenEndpointAuthSigningAlg(); void setTokenEndpointAuthSigningAlg(JWSAlgorithm tokenEndpointAuthSigningAlg); @Basic @Column(name="default_max_age") Integer getDefaultMaxAge(); void setDefaultMaxAge(Integer defaultMaxAge); @Basic @Column(name="require_auth_time") Boolean getRequireAuthTime(); void setRequireAuthTime(Boolean requireAuthTime); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_response_type", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="response_type") Set<String> getResponseTypes(); void setResponseTypes(Set<String> responseTypes); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_default_acr_value", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="default_acr_value") Set<String> getDefaultACRvalues(); void setDefaultACRvalues(Set<String> defaultACRvalues); @Basic @Column(name="initiate_login_uri") String getInitiateLoginUri(); void setInitiateLoginUri(String initiateLoginUri); @Basic @Column(name="post_logout_redirect_uri") String getPostLogoutRedirectUri(); void setPostLogoutRedirectUri(String postLogoutRedirectUri); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_request_uri", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="request_uri") Set<String> getRequestUris(); void setRequestUris(Set<String> requestUris); @Temporal(TemporalType.TIMESTAMP) @Column(name="created_at") Date getCreatedAt(); void setCreatedAt(Date createdAt); @Override boolean isAutoApprove(String scope); }
ClientDetailsEntity implements ClientDetails { public ClientDetailsEntity() { } ClientDetailsEntity(); @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") Long getId(); void setId(Long id); @Basic @Column(name="client_description") String getClientDescription(); void setClientDescription(String clientDescription); @Transient boolean isAllowRefresh(); @Basic @Column(name="reuse_refresh_tokens") boolean isReuseRefreshToken(); void setReuseRefreshToken(boolean reuseRefreshToken); @Basic @Column(name="id_token_validity_seconds") Integer getIdTokenValiditySeconds(); void setIdTokenValiditySeconds(Integer idTokenValiditySeconds); @Basic @Column(name="dynamically_registered") boolean isDynamicallyRegistered(); void setDynamicallyRegistered(boolean dynamicallyRegistered); @Basic @Column(name="allow_introspection") boolean isAllowIntrospection(); void setAllowIntrospection(boolean allowIntrospection); @Override @Transient boolean isSecretRequired(); @Override @Transient boolean isScoped(); @Basic @Override @Column(name="client_id") String getClientId(); void setClientId(String clientId); @Basic @Override @Column(name="client_secret") String getClientSecret(); void setClientSecret(String clientSecret); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_scope", joinColumns=@JoinColumn(name="owner_id") ) @Override @Column(name="scope") Set<String> getScope(); void setScope(Set<String> scope); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_grant_type", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="grant_type") Set<String> getGrantTypes(); void setGrantTypes(Set<String> grantTypes); @Override Set<String> getAuthorizedGrantTypes(); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_authority", joinColumns=@JoinColumn(name="owner_id") ) @Override @Column(name="authority") Set<GrantedAuthority> getAuthorities(); void setAuthorities(Set<GrantedAuthority> authorities); @Override @Basic @Column(name="access_token_validity_seconds") Integer getAccessTokenValiditySeconds(); void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds); @Override @Basic @Column(name="refresh_token_validity_seconds") Integer getRefreshTokenValiditySeconds(); void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_redirect_uri", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="redirect_uri") Set<String> getRedirectUris(); void setRedirectUris(Set<String> redirectUris); @Override @Transient Set<String> getRegisteredRedirectUri(); @Override @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_resource", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="resource_id") Set<String> getResourceIds(); void setResourceIds(Set<String> resourceIds); @Override @Transient Map<String, Object> getAdditionalInformation(); @Enumerated(EnumType.STRING) @Column(name="application_type") AppType getApplicationType(); void setApplicationType(AppType applicationType); @Basic @Column(name="client_name") String getClientName(); void setClientName(String clientName); @Enumerated(EnumType.STRING) @Column(name="token_endpoint_auth_method") AuthMethod getTokenEndpointAuthMethod(); void setTokenEndpointAuthMethod(AuthMethod tokenEndpointAuthMethod); @Enumerated(EnumType.STRING) @Column(name="subject_type") SubjectType getSubjectType(); void setSubjectType(SubjectType subjectType); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_contact", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="contact") Set<String> getContacts(); void setContacts(Set<String> contacts); @Basic @Column(name="logo_uri") String getLogoUri(); void setLogoUri(String logoUri); @Basic @Column(name="policy_uri") String getPolicyUri(); void setPolicyUri(String policyUri); @Basic @Column(name="client_uri") String getClientUri(); void setClientUri(String clientUri); @Basic @Column(name="tos_uri") String getTosUri(); void setTosUri(String tosUri); @Basic @Column(name="jwks_uri") String getJwksUri(); void setJwksUri(String jwksUri); @Basic @Column(name="sector_identifier_uri") String getSectorIdentifierUri(); void setSectorIdentifierUri(String sectorIdentifierUri); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="request_object_signing_alg")) }) JWSAlgorithmEmbed getRequestObjectSigningAlgEmbed(); void setRequestObjectSigningAlgEmbed(JWSAlgorithmEmbed requestObjectSigningAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="user_info_signed_response_alg")) }) JWSAlgorithmEmbed getUserInfoSignedResponseAlgEmbed(); void setUserInfoSignedResponseAlgEmbed(JWSAlgorithmEmbed userInfoSignedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="user_info_encrypted_response_alg")) }) JWEAlgorithmEmbed getUserInfoEncryptedResponseAlgEmbed(); void setUserInfoEncryptedResponseAlgEmbed(JWEAlgorithmEmbed userInfoEncryptedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="user_info_encrypted_response_enc")) }) JWEEncryptionMethodEmbed getUserInfoEncryptedResponseEncEmbed(); void setUserInfoEncryptedResponseEncEmbed(JWEEncryptionMethodEmbed userInfoEncryptedResponseEnc); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="id_token_signed_response_alg")) }) JWSAlgorithmEmbed getIdTokenSignedResponseAlgEmbed(); void setIdTokenSignedResponseAlgEmbed(JWSAlgorithmEmbed idTokenSignedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="id_token_encrypted_response_alg")) }) JWEAlgorithmEmbed getIdTokenEncryptedResponseAlgEmbed(); void setIdTokenEncryptedResponseAlgEmbed(JWEAlgorithmEmbed idTokenEncryptedResponseAlg); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="id_token_encrypted_response_enc")) }) JWEEncryptionMethodEmbed getIdTokenEncryptedResponseEncEmbed(); void setIdTokenEncryptedResponseEncEmbed(JWEEncryptionMethodEmbed idTokenEncryptedResponseEnc); @Embedded @AttributeOverrides({ @AttributeOverride(name = "algorithmName", column=@Column(name="token_endpoint_auth_signing_alg")) }) JWSAlgorithmEmbed getTokenEndpointAuthSigningAlgEmbed(); void setTokenEndpointAuthSigningAlgEmbed(JWSAlgorithmEmbed tokenEndpointAuthSigningAlgEmbed); @Transient JWSAlgorithm getRequestObjectSigningAlg(); void setRequestObjectSigningAlg(JWSAlgorithm requestObjectSigningAlg); @Transient JWSAlgorithm getUserInfoSignedResponseAlg(); void setUserInfoSignedResponseAlg(JWSAlgorithm userInfoSignedResponseAlg); @Transient JWEAlgorithm getUserInfoEncryptedResponseAlg(); void setUserInfoEncryptedResponseAlg(JWEAlgorithm userInfoEncryptedResponseAlg); @Transient EncryptionMethod getUserInfoEncryptedResponseEnc(); void setUserInfoEncryptedResponseEnc(EncryptionMethod userInfoEncryptedResponseEnc); @Transient JWSAlgorithm getIdTokenSignedResponseAlg(); void setIdTokenSignedResponseAlg(JWSAlgorithm idTokenSignedResponseAlg); @Transient JWEAlgorithm getIdTokenEncryptedResponseAlg(); void setIdTokenEncryptedResponseAlg(JWEAlgorithm idTokenEncryptedResponseAlg); @Transient EncryptionMethod getIdTokenEncryptedResponseEnc(); void setIdTokenEncryptedResponseEnc(EncryptionMethod idTokenEncryptedResponseEnc); @Transient JWSAlgorithm getTokenEndpointAuthSigningAlg(); void setTokenEndpointAuthSigningAlg(JWSAlgorithm tokenEndpointAuthSigningAlg); @Basic @Column(name="default_max_age") Integer getDefaultMaxAge(); void setDefaultMaxAge(Integer defaultMaxAge); @Basic @Column(name="require_auth_time") Boolean getRequireAuthTime(); void setRequireAuthTime(Boolean requireAuthTime); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_response_type", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="response_type") Set<String> getResponseTypes(); void setResponseTypes(Set<String> responseTypes); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_default_acr_value", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="default_acr_value") Set<String> getDefaultACRvalues(); void setDefaultACRvalues(Set<String> defaultACRvalues); @Basic @Column(name="initiate_login_uri") String getInitiateLoginUri(); void setInitiateLoginUri(String initiateLoginUri); @Basic @Column(name="post_logout_redirect_uri") String getPostLogoutRedirectUri(); void setPostLogoutRedirectUri(String postLogoutRedirectUri); @ElementCollection(fetch = FetchType.EAGER) @CollectionTable( name="client_request_uri", joinColumns=@JoinColumn(name="owner_id") ) @Column(name="request_uri") Set<String> getRequestUris(); void setRequestUris(Set<String> requestUris); @Temporal(TemporalType.TIMESTAMP) @Column(name="created_at") Date getCreatedAt(); void setCreatedAt(Date createdAt); @Override boolean isAutoApprove(String scope);  }