Class GitHubAuthentication
java.lang.Object
org.springframework.vault.authentication.GitHubAuthentication
- All Implemented Interfaces:
AuthenticationStepsFactory
,ClientAuthentication
public class GitHubAuthentication
extends Object
implements ClientAuthentication, AuthenticationStepsFactory
GitHub's authentication method can be used to authenticate with Vault using a GitHub
personal access token.
- Since:
- 3.2
- Author:
- Nanne Baars, Mark Paluch
- See Also:
-
Constructor Summary
ConstructorDescriptionGitHubAuthentication
(GitHubAuthenticationOptions options, RestOperations restOperations) -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationSteps
Creates aAuthenticationSteps
for GitHub authentication givenGitHubAuthenticationOptions
.Get theAuthenticationSteps
describing an authentication flow.login()
Return aVaultToken
.
-
Constructor Details
-
GitHubAuthentication
- Parameters:
options
- must not be null.restOperations
- must not be null.
-
-
Method Details
-
createAuthenticationSteps
Creates aAuthenticationSteps
for GitHub authentication givenGitHubAuthenticationOptions
.- Parameters:
options
- must not be null.- Returns:
AuthenticationSteps
for github authentication.
-
getAuthenticationSteps
Description copied from interface:AuthenticationStepsFactory
Get theAuthenticationSteps
describing an authentication flow.- Specified by:
getAuthenticationSteps
in interfaceAuthenticationStepsFactory
- Returns:
- the
AuthenticationSteps
describing an authentication flow.
-
login
Description copied from interface:ClientAuthentication
Return aVaultToken
. This method can optionally log into Vault to obtain atoken
.- Specified by:
login
in interfaceClientAuthentication
- Returns:
- a
VaultToken
. - Throws:
VaultException
-