Package org.genesys.blocks.oauth.model
Class OAuthClient
-
- All Implemented Interfaces:
Serializable,Activatable,Copyable<OAuthClient>,EntityId,org.springframework.data.domain.Persistable<Long>
@Entity public class OAuthClient extends AclSid implements Copyable<OAuthClient>
OAuth Client information.- Author:
- Matija Obreza
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.genesys.blocks.security.model.AclSid
OIDC_SID_ID
-
Fields inherited from class org.genesys.blocks.model.VersionedModel
active
-
Fields inherited from interface org.genesys.blocks.model.Copyable
COPYABLE_FIELDS
-
-
Constructor Summary
Constructors Constructor Description OAuthClient()Instantiates a new o auth client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthClientapply(OAuthClient source)OAuthClientcopy()Returns null.IntegergetAccessTokenValiditySeconds()Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()Set<String>getAuthorizedGrantTypes()StringgetFullName()Subclasses should override this method and return a sensible display name for the SID.IntegergetRefreshTokenValiditySeconds()Set<String>getRegisteredRedirectUri()Set<String>getScope()booleanisAutoApprove(String scope)booleanisScoped()booleanisSecretRequired()Client secret is required when provided.voidsetRuntimeAuthorities(List<org.springframework.security.core.GrantedAuthority> authorities)Set the actual authorities to use at runtime.voidsetScopes(Set<String> scopes)Sets the scopes.StringtoString()-
Methods inherited from class org.genesys.blocks.model.VersionedModel
getVersion, isActive, setActive, setVersion
-
Methods inherited from class org.genesys.blocks.model.BasicModel
getId, setId
-
Methods inherited from class org.genesys.blocks.model.EmptyModel
equals, hashCode, isNew
-
-
-
-
Method Detail
-
isSecretRequired
public boolean isSecretRequired()
Client secret is required when provided.- Returns:
- true, if is secret required
-
isScoped
public boolean isScoped()
-
setScopes
public void setScopes(Set<String> scopes)
Sets the scopes.- Parameters:
scopes- the new scopes
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
-
getAccessTokenValiditySeconds
public Integer getAccessTokenValiditySeconds()
-
getRefreshTokenValiditySeconds
public Integer getRefreshTokenValiditySeconds()
-
isAutoApprove
public boolean isAutoApprove(String scope)
-
getFullName
public String getFullName()
Description copied from class:AclSidSubclasses should override this method and return a sensible display name for the SID.- Overrides:
getFullNamein classAclSid- Returns:
- SID full name
-
copy
public OAuthClient copy()
Returns null.- Specified by:
copyin interfaceCopyable<OAuthClient>- Returns:
- the o auth client
-
apply
public OAuthClient apply(OAuthClient source)
- Specified by:
applyin interfaceCopyable<OAuthClient>
-
setRuntimeAuthorities
public void setRuntimeAuthorities(List<org.springframework.security.core.GrantedAuthority> authorities)
Set the actual authorities to use at runtime. SeeruntimeAuthorities.- Parameters:
authorities- the new runtime authorities
-
-