Class IridaClientDetails
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.model.IridaClientDetails
-
- All Implemented Interfaces:
IridaThing,MutableIridaThing,Timestamped<java.lang.Long>
@Entity public class IridaClientDetails extends java.lang.Object implements MutableIridaThing
Object representing a client that has been registered to communicate with this API via OAuth2
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLIENT_ID_CONSTRAINT_NAMEstatic java.lang.IntegerDEFAULT_REFRESH_TOKEN_VALIDITYstatic java.lang.IntegerDEFAULT_TOKEN_VALIDITY
-
Constructor Summary
Constructors Constructor Description IridaClientDetails()Default constructor with empty scopes, grant types, and redirect urisIridaClientDetails(java.lang.String clientId, java.lang.String clientSecret, java.util.Set<java.lang.String> scope, java.util.Set<java.lang.String> authorizedGrantTypes)Construct new IridaClientDetails with the following params
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetAccessTokenValiditySeconds()java.util.Set<java.lang.String>getAuthorizedGrantTypes()java.lang.StringgetClientId()java.lang.StringgetClientSecret()java.util.DategetCreatedDate()Get the created date of the objectjava.lang.LonggetId()Get the numerical identifier for this objectjava.lang.StringgetLabel()Get a human readable label for this object.java.util.DategetModifiedDate()Get the date that this object was last modifiedjava.lang.StringgetRedirectUri()java.lang.IntegergetRefreshTokenValiditySeconds()java.util.Set<java.lang.String>getRegisteredRedirectUri()java.util.Set<java.lang.String>getScope()booleanisScoped()booleanisSecretRequired()voidsetAccessTokenValiditySeconds(java.lang.Integer accessTokenValiditySeconds)voidsetAuthorizedGrantTypes(java.util.Set<java.lang.String> authorizedGrantTypes)voidsetClientId(java.lang.String clientId)voidsetClientSecret(java.lang.String clientSecret)voidsetId(java.lang.Long id)Set the numerical identifier for this objectvoidsetModifiedDate(java.util.Date modifiedDate)Set the modification time of this objectvoidsetRefreshTokenValiditySeconds(java.lang.Integer refreshTokenValiditySeconds)voidsetRegisteredRedirectUri(java.lang.String registeredRedirectUri)voidsetScope(java.util.Set<java.lang.String> scope)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.corefacility.bioinformatics.irida.model.IridaThing
getIdentifier, setLabel
-
-
-
-
Field Detail
-
CLIENT_ID_CONSTRAINT_NAME
public static final java.lang.String CLIENT_ID_CONSTRAINT_NAME
- See Also:
- Constant Field Values
-
DEFAULT_TOKEN_VALIDITY
public static final java.lang.Integer DEFAULT_TOKEN_VALIDITY
-
DEFAULT_REFRESH_TOKEN_VALIDITY
public static final java.lang.Integer DEFAULT_REFRESH_TOKEN_VALIDITY
-
-
Constructor Detail
-
IridaClientDetails
public IridaClientDetails()
Default constructor with empty scopes, grant types, and redirect uris
-
IridaClientDetails
public IridaClientDetails(java.lang.String clientId, java.lang.String clientSecret, java.util.Set<java.lang.String> scope, java.util.Set<java.lang.String> authorizedGrantTypes)Construct new IridaClientDetails with the following params- Parameters:
clientId- The ID of the client for this objectclientSecret- The Client Secret for this clientscope- The scopes this client can accessauthorizedGrantTypes- The grant types allowed for this client
-
-
Method Detail
-
getClientId
public java.lang.String getClientId()
-
isSecretRequired
public boolean isSecretRequired()
-
getClientSecret
public java.lang.String getClientSecret()
-
isScoped
public boolean isScoped()
-
getScope
public java.util.Set<java.lang.String> getScope()
-
getAuthorizedGrantTypes
public java.util.Set<java.lang.String> getAuthorizedGrantTypes()
-
getRegisteredRedirectUri
public java.util.Set<java.lang.String> getRegisteredRedirectUri()
-
setRegisteredRedirectUri
public void setRegisteredRedirectUri(java.lang.String registeredRedirectUri)
-
getRedirectUri
public java.lang.String getRedirectUri()
-
getAccessTokenValiditySeconds
public java.lang.Integer getAccessTokenValiditySeconds()
-
getRefreshTokenValiditySeconds
public java.lang.Integer getRefreshTokenValiditySeconds()
-
getId
public java.lang.Long getId()
Description copied from interface:IridaThingGet the numerical identifier for this object- Specified by:
getIdin interfaceIridaThing- Specified by:
getIdin interfaceTimestamped<java.lang.Long>- Returns:
- the numerical identifier for the object
-
setId
public void setId(java.lang.Long id)
Description copied from interface:MutableIridaThingSet the numerical identifier for this object- Specified by:
setIdin interfaceMutableIridaThing- Parameters:
id- The ID to set
-
setClientId
public void setClientId(java.lang.String clientId)
-
setClientSecret
public void setClientSecret(java.lang.String clientSecret)
- Parameters:
clientSecret- the clientSecret to set
-
setScope
public void setScope(java.util.Set<java.lang.String> scope)
- Parameters:
scope- the scope to set
-
setAuthorizedGrantTypes
public void setAuthorizedGrantTypes(java.util.Set<java.lang.String> authorizedGrantTypes)
- Parameters:
authorizedGrantTypes- the authorizedGrantTypes to set
-
setAccessTokenValiditySeconds
public void setAccessTokenValiditySeconds(java.lang.Integer accessTokenValiditySeconds)
- Parameters:
accessTokenValiditySeconds- the accessTokenValiditySeconds to set
-
setRefreshTokenValiditySeconds
public void setRefreshTokenValiditySeconds(java.lang.Integer refreshTokenValiditySeconds)
- Parameters:
refreshTokenValiditySeconds- the refreshTokenValiditySeconds to set
-
getLabel
public java.lang.String getLabel()
Description copied from interface:IridaThingGet a human readable label for this object.- Specified by:
getLabelin interfaceIridaThing- Returns:
- a human-readable label for the object.
-
getModifiedDate
public java.util.Date getModifiedDate()
Description copied from interface:MutableIridaThingGet the date that this object was last modified- Specified by:
getModifiedDatein interfaceMutableIridaThing- Returns:
Dateobject of the modified date
-
setModifiedDate
public void setModifiedDate(java.util.Date modifiedDate)
Description copied from interface:MutableIridaThingSet the modification time of this object- Specified by:
setModifiedDatein interfaceMutableIridaThing- Parameters:
modifiedDate- The date where this object was modified
-
getCreatedDate
public java.util.Date getCreatedDate()
Description copied from interface:TimestampedGet the created date of the object- Specified by:
getCreatedDatein interfaceTimestamped<java.lang.Long>- Returns:
- A
Dateobject of the created date
-
-