springfox.documentation.service.GrantType Java Examples
The following examples show how to use
springfox.documentation.service.GrantType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OAuthServerConfiguration.java From microservices-basics-spring-boot with Apache License 2.0 | 5 votes |
private OAuth securitySchema() { List<AuthorizationScope> authorizationScopeList = new ArrayList<>(); authorizationScopeList.add(new AuthorizationScope(OAUTH2_CLIENT_SCOPE, "Access for open id default")); List<GrantType> grantTypes = new ArrayList<>(); ResourceOwnerPasswordCredentialsGrant passwordOwnerGrant = new ResourceOwnerPasswordCredentialsGrant( "/userauth/oauth/token"); grantTypes.add(passwordOwnerGrant); OAuth oAuth = new OAuth("oauth", authorizationScopeList, grantTypes); return oAuth; }
Example #2
Source File: SwaggerConfig.java From spring-security-oauth with MIT License | 5 votes |
private SecurityScheme securityScheme() { GrantType grantType = new AuthorizationCodeGrantBuilder() .tokenEndpoint(new TokenEndpoint(AUTH_SERVER + "/token", "oauthtoken")) .tokenRequestEndpoint( new TokenRequestEndpoint(AUTH_SERVER + "/authorize", CLIENT_ID, CLIENT_ID)) .build(); SecurityScheme oauth = new OAuthBuilder().name("spring_oauth") .grantTypes(Arrays.asList(grantType)) .scopes(Arrays.asList(scopes())) .build(); return oauth; }
Example #3
Source File: SwaggerConfig.java From pacbot with Apache License 2.0 | 4 votes |
List<GrantType> grantTypes() { GrantType grantType = new ImplicitGrantBuilder() .loginEndpoint(new LoginEndpoint(authorizeEndpoint)) .build(); return newArrayList(grantType); }
Example #4
Source File: Application.java From springfox-demos with Apache License 2.0 | 4 votes |
List<GrantType> grantTypes() { GrantType grantType = new ImplicitGrantBuilder() .loginEndpoint(new LoginEndpoint("http://petstore.swagger.io/api/oauth/dialog")) .build(); return Collections.singletonList(grantType); }