Last active
April 29, 2020 06:55
-
-
Save JonasGroeger/d32b6e67e6ee38465c4dab44fa7a2486 to your computer and use it in GitHub Desktop.
OAuth 2 grant types enum for Spring apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum OAuth2GrantTypes { | |
// See https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/oauth2/core/AuthorizationGrantType.html | |
AUTHORIZATION_CODE("authorization_code"), | |
IMPLICIT("implicit"), | |
PASSWORD("password"), | |
CLIENT_CREDENTIALS("client_credentials"), | |
REFRESH_TOKEN("refresh_token"); | |
// Currently not supported by Spring Security | |
// https://tools.ietf.org/html/draft-ietf-oauth-device-flow-01 | |
// DEVICE_CODE("device_code") | |
private final String name; | |
OAuth2GrantTypes(String name) { | |
this.name = name; | |
} | |
public String getName() { | |
return name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment