Class GCubeSecret
- java.lang.Object
-
- org.gcube.common.authorization.utils.secret.Secret
-
- org.gcube.common.authorization.utils.secret.GCubeSecret
-
- All Implemented Interfaces:
Comparable<Secret>
public class GCubeSecret extends Secret
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected org.gcube.common.authorization.library.AuthorizationEntryauthorizationEntrystatic StringGCUBE_TOKEN_REGEX
-
Constructor Summary
Constructors Constructor Description GCubeSecret(String token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheck(String token)protected org.gcube.common.authorization.library.AuthorizationEntrygetAuthorizationEntry()org.gcube.common.authorization.library.utils.CallergetCaller()org.gcube.common.authorization.library.provider.ClientInfogetClientInfo()StringgetContext()Map<String,String>getHTTPAuthorizationHeaders()UsergetUser()booleanisExpired()booleanisRefreshable()voidresetToken()voidsetToken()-
Methods inherited from class org.gcube.common.authorization.utils.secret.Secret
compareTo, equals, getToken, getUsername, hashCode, isApplication, reset, set, setAuthorizationProvider
-
-
-
-
Field Detail
-
GCUBE_TOKEN_REGEX
public static final String GCUBE_TOKEN_REGEX
- See Also:
- Constant Field Values
-
authorizationEntry
protected org.gcube.common.authorization.library.AuthorizationEntry authorizationEntry
-
-
Constructor Detail
-
GCubeSecret
public GCubeSecret(String token)
-
-
Method Detail
-
check
protected void check(String token) throws org.gcube.common.authorization.library.exception.AuthorizationException
-
getAuthorizationEntry
protected org.gcube.common.authorization.library.AuthorizationEntry getAuthorizationEntry() throws Exception- Throws:
Exception
-
setToken
public void setToken() throws Exception
-
resetToken
public void resetToken() throws Exception- Specified by:
resetTokenin classSecret- Throws:
Exception
-
getClientInfo
public org.gcube.common.authorization.library.provider.ClientInfo getClientInfo() throws Exception- Specified by:
getClientInfoin classSecret- Throws:
Exception
-
getCaller
public org.gcube.common.authorization.library.utils.Caller getCaller() throws Exception
-
getContext
public String getContext() throws Exception
- Specified by:
getContextin classSecret- Throws:
Exception
-
getHTTPAuthorizationHeaders
public Map<String,String> getHTTPAuthorizationHeaders()
- Specified by:
getHTTPAuthorizationHeadersin classSecret
-
isRefreshable
public boolean isRefreshable()
- Specified by:
isRefreshablein classSecret
-
-