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.String
CLIENT_ID_CONSTRAINT_NAME
static java.lang.Integer
DEFAULT_REFRESH_TOKEN_VALIDITY
static java.lang.Integer
DEFAULT_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.Integer
getAccessTokenValiditySeconds()
java.util.Set<java.lang.String>
getAuthorizedGrantTypes()
java.lang.String
getClientId()
java.lang.String
getClientSecret()
java.util.Date
getCreatedDate()
Get the created date of the objectjava.lang.Long
getId()
Get the numerical identifier for this objectjava.lang.String
getLabel()
Get a human readable label for this object.java.util.Date
getModifiedDate()
Get the date that this object was last modifiedjava.lang.String
getRedirectUri()
java.lang.Integer
getRefreshTokenValiditySeconds()
java.util.Set<java.lang.String>
getRegisteredRedirectUri()
java.util.Set<java.lang.String>
getScope()
boolean
isScoped()
boolean
isSecretRequired()
void
setAccessTokenValiditySeconds(java.lang.Integer accessTokenValiditySeconds)
void
setAuthorizedGrantTypes(java.util.Set<java.lang.String> authorizedGrantTypes)
void
setClientId(java.lang.String clientId)
void
setClientSecret(java.lang.String clientSecret)
void
setId(java.lang.Long id)
Set the numerical identifier for this objectvoid
setModifiedDate(java.util.Date modifiedDate)
Set the modification time of this objectvoid
setRefreshTokenValiditySeconds(java.lang.Integer refreshTokenValiditySeconds)
void
setRegisteredRedirectUri(java.lang.String registeredRedirectUri)
void
setScope(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:IridaThing
Get the numerical identifier for this object- Specified by:
getId
in interfaceIridaThing
- Specified by:
getId
in interfaceTimestamped<java.lang.Long>
- Returns:
- the numerical identifier for the object
-
setId
public void setId(java.lang.Long id)
Description copied from interface:MutableIridaThing
Set the numerical identifier for this object- Specified by:
setId
in 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:IridaThing
Get a human readable label for this object.- Specified by:
getLabel
in interfaceIridaThing
- Returns:
- a human-readable label for the object.
-
getModifiedDate
public java.util.Date getModifiedDate()
Description copied from interface:MutableIridaThing
Get the date that this object was last modified- Specified by:
getModifiedDate
in interfaceMutableIridaThing
- Returns:
Date
object of the modified date
-
setModifiedDate
public void setModifiedDate(java.util.Date modifiedDate)
Description copied from interface:MutableIridaThing
Set the modification time of this object- Specified by:
setModifiedDate
in interfaceMutableIridaThing
- Parameters:
modifiedDate
- The date where this object was modified
-
getCreatedDate
public java.util.Date getCreatedDate()
Description copied from interface:Timestamped
Get the created date of the object- Specified by:
getCreatedDate
in interfaceTimestamped<java.lang.Long>
- Returns:
- A
Date
object of the created date
-
-