Package io.vertx.ext.auth.oauth2
Class Oauth2Credentials
- java.lang.Object
-
- io.vertx.ext.auth.oauth2.Oauth2Credentials
-
- All Implemented Interfaces:
Credentials
public class Oauth2Credentials extends Object implements Credentials
Credentials specific to theOAuth2Authprovider- Author:
- Paulo Lopes
-
-
Constructor Summary
Constructors Constructor Description Oauth2Credentials()Oauth2Credentials(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Oauth2CredentialsaddScope(String scope)<V> voidcheckValid(V arg)Implementors should override this method to perform validation.StringgetAssertion()StringgetCode()StringgetCodeVerifier()OAuth2FlowTypegetFlow()JsonObjectgetJwt()StringgetPassword()StringgetRedirectUri()List<String>getScopes()StringgetUsername()Oauth2CredentialssetAssertion(String assertion)Oauth2CredentialssetCode(String code)Oauth2CredentialssetCodeVerifier(String codeVerifier)Oauth2CredentialssetFlow(OAuth2FlowType flow)Oauth2CredentialssetJwt(JsonObject jwt)Oauth2CredentialssetPassword(String password)Oauth2CredentialssetRedirectUri(String redirectUri)Oauth2CredentialssetScopes(List<String> scopes)Oauth2CredentialssetUsername(String username)JsonObjecttoJson()Simple interop to downcast back to JSON for backwards compatibility.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.vertx.ext.auth.authentication.Credentials
applyHttpChallenge, applyHttpChallenge, applyHttpChallenge, toHttpAuthorization
-
-
-
-
Constructor Detail
-
Oauth2Credentials
public Oauth2Credentials()
-
Oauth2Credentials
public Oauth2Credentials(JsonObject json)
-
-
Method Detail
-
getCode
public String getCode()
-
setCode
public Oauth2Credentials setCode(String code)
-
getRedirectUri
public String getRedirectUri()
-
setRedirectUri
public Oauth2Credentials setRedirectUri(String redirectUri)
-
getCodeVerifier
public String getCodeVerifier()
-
setCodeVerifier
public Oauth2Credentials setCodeVerifier(String codeVerifier)
-
addScope
public Oauth2Credentials addScope(String scope)
-
setScopes
public Oauth2Credentials setScopes(List<String> scopes)
-
getJwt
public JsonObject getJwt()
-
setJwt
public Oauth2Credentials setJwt(JsonObject jwt)
-
getAssertion
public String getAssertion()
-
setAssertion
public Oauth2Credentials setAssertion(String assertion)
-
getPassword
public String getPassword()
-
setPassword
public Oauth2Credentials setPassword(String password)
-
getUsername
public String getUsername()
-
setUsername
public Oauth2Credentials setUsername(String username)
-
getFlow
public OAuth2FlowType getFlow()
-
setFlow
public Oauth2Credentials setFlow(OAuth2FlowType flow)
-
toJson
public JsonObject toJson()
Description copied from interface:CredentialsSimple interop to downcast back to JSON for backwards compatibility.- Specified by:
toJsonin interfaceCredentials- Returns:
- JSON representation of this credential.
-
checkValid
public <V> void checkValid(V arg) throws CredentialValidationExceptionDescription copied from interface:CredentialsImplementors should override this method to perform validation. An argument is allowed to allow custom validation, for example, when given a configuration property, a specific property may be allowed to be null.- Specified by:
checkValidin interfaceCredentials- Type Parameters:
V- the generic type of the argument- Parameters:
arg- optional argument or null.- Throws:
CredentialValidationException- when the validation fails
-
-