Class OAuthToken
- java.lang.Object
-
- de.businesscode.bcdui.subjectsettings.ExternalAuthenticationToken
-
- de.businesscode.bcdui.subjectsettings.oauth2.OAuthToken
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.shiro.authc.AuthenticationToken
public class OAuthToken extends ExternalAuthenticationToken
OAuth authentication token which is supported byOAuthRealm
instances. This token carries information about authorization code which is required by a realm to create access tokens to query the resource server. If you want to do authorization with JdbcRealm, enable the following in web.xml: authcStrategy = org.apache.shiro.authc.pam.AtLeastOneSuccessfulStrategy securityManager.authenticator.authenticationStrategy = $authcStrategy securityManager.realms = $oauthcMyRealm, $realmBcdJdbc- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
authCode
protected OAuthAuthenticatingFilter
authenticator
protected java.lang.String
clientId
protected java.lang.String
redirectUrl
-
Fields inherited from class de.businesscode.bcdui.subjectsettings.ExternalAuthenticationToken
principal
-
-
Constructor Summary
Constructors Constructor Description OAuthToken(OAuthAuthenticatingFilter authenticator, java.lang.String clientId, java.lang.String redirectUrl, java.lang.String authCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthCode()
java.lang.String
getClientId()
java.lang.Object
getCredentials()
java.lang.Object
getPrincipal()
java.lang.String
getRedirectUrl()
boolean
isCreatedBy(OAuthAuthenticatingFilter authenticator)
void
setPrincipal(java.lang.Object principal)
java.lang.String
toString()
-
-
-
Field Detail
-
authCode
protected final java.lang.String authCode
-
clientId
protected final java.lang.String clientId
-
redirectUrl
protected final java.lang.String redirectUrl
-
authenticator
protected final OAuthAuthenticatingFilter authenticator
-
-
Constructor Detail
-
OAuthToken
public OAuthToken(OAuthAuthenticatingFilter authenticator, java.lang.String clientId, java.lang.String redirectUrl, java.lang.String authCode)
-
-
Method Detail
-
getClientId
public java.lang.String getClientId()
-
getRedirectUrl
public java.lang.String getRedirectUrl()
-
isCreatedBy
public boolean isCreatedBy(OAuthAuthenticatingFilter authenticator)
- Parameters:
authenticator
-- Returns:
- true if this token has been created by given authenticator instance
-
getAuthCode
public java.lang.String getAuthCode()
-
setPrincipal
public void setPrincipal(java.lang.Object principal)
-
getCredentials
public java.lang.Object getCredentials()
- Specified by:
getCredentials
in interfaceorg.apache.shiro.authc.AuthenticationToken
- Overrides:
getCredentials
in classExternalAuthenticationToken
-
getPrincipal
public java.lang.Object getPrincipal()
- Specified by:
getPrincipal
in interfaceorg.apache.shiro.authc.AuthenticationToken
- Overrides:
getPrincipal
in classExternalAuthenticationToken
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-