Package org.teiid.jboss.oauth
Class OAuth20LoginModule
- java.lang.Object
-
- org.jboss.security.auth.spi.AbstractServerLoginModule
-
- org.picketbox.datasource.security.AbstractPasswordCredentialLoginModule
-
- org.teiid.jboss.oauth.OAuth20LoginModule
-
- All Implemented Interfaces:
LoginModule
- Direct Known Subclasses:
JWTBearerTokenLoginModule,SAMLBearerTokenLoginModule
public class OAuth20LoginModule extends org.picketbox.datasource.security.AbstractPasswordCredentialLoginModuleLogin module to capture OAuth 2.0 profile credential for web service resource-adapter. Users either need to provide all the options or extend this login module to provide all necessary options at runtime.
-
-
Field Summary
Fields Modifier and Type Field Description protected PrincipalcallerPrincipalprotected SubjectcallerSubjectprotected OAuthCredentialcredential
-
Constructor Summary
Constructors Constructor Description OAuth20LoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancommit()StringgetAccessToken()StringgetAccessTokenURI()StringgetClientId()StringgetClientSecret()OAuthCredentialgetCredential()protected PrincipalgetIdentity()StringgetRefreshToken()protected Group[]getRoleSets()voidinitialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options)booleanlogin()voidsetAccessToken(String accessToken)voidsetAccessTokenURI(String accessTokenURI)voidsetClientId(String clientId)voidsetClientSecret(String clientSecret)voidsetCredential(OAuthCredential credential)voidsetRefreshToken(String refreshToken)-
Methods inherited from class org.picketbox.datasource.security.AbstractPasswordCredentialLoginModule
logout, removeCredentials
-
-
-
-
Field Detail
-
credential
protected OAuthCredential credential
-
callerSubject
protected Subject callerSubject
-
callerPrincipal
protected Principal callerPrincipal
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initializein interfaceLoginModule- Overrides:
initializein classorg.jboss.security.auth.spi.AbstractServerLoginModule
-
login
public boolean login() throws LoginException- Specified by:
loginin interfaceLoginModule- Overrides:
loginin classorg.jboss.security.auth.spi.AbstractServerLoginModule- Throws:
LoginException
-
getIdentity
protected Principal getIdentity()
- Specified by:
getIdentityin classorg.jboss.security.auth.spi.AbstractServerLoginModule
-
getRoleSets
protected Group[] getRoleSets() throws LoginException
- Specified by:
getRoleSetsin classorg.jboss.security.auth.spi.AbstractServerLoginModule- Throws:
LoginException
-
commit
public boolean commit() throws LoginException- Specified by:
commitin interfaceLoginModule- Overrides:
commitin classorg.jboss.security.auth.spi.AbstractServerLoginModule- Throws:
LoginException
-
getCredential
public OAuthCredential getCredential()
-
setCredential
public void setCredential(OAuthCredential credential)
-
getClientId
public String getClientId()
-
setClientId
public void setClientId(String clientId)
-
getClientSecret
public String getClientSecret()
-
setClientSecret
public void setClientSecret(String clientSecret)
-
getRefreshToken
public String getRefreshToken()
-
setRefreshToken
public void setRefreshToken(String refreshToken)
-
getAccessTokenURI
public String getAccessTokenURI()
-
setAccessTokenURI
public void setAccessTokenURI(String accessTokenURI)
-
getAccessToken
public String getAccessToken()
-
setAccessToken
public void setAccessToken(String accessToken)
-
-