public class OAuth20AuthorizeEndpointController extends BaseOAuth20Controller
| Modifier and Type | Field and Description |
|---|---|
protected OAuth20CasAuthenticationBuilder |
authenticationBuilder
The Authentication builder.
|
protected ConsentApprovalViewResolver |
consentApprovalViewResolver
The Consent approval view resolver.
|
protected java.util.Set<OAuth20AuthorizationResponseBuilder> |
oauthAuthorizationResponseBuilders
Collection of response builders.
|
protected OAuthCodeFactory |
oAuthCodeFactory
The code factory instance.
|
protected java.util.Set<OAuth20AuthorizationRequestValidator> |
oauthRequestValidators
Collection of request validators.
|
protected org.apereo.cas.audit.AuditableExecution |
registeredServiceAccessStrategyEnforcer
Access strategy enforcer.
|
accessTokenFactory, casProperties, principalFactory, scopeToAttributesFilter, servicesManager, ticketGrantingTicketCookieGenerator, ticketRegistry, webApplicationServiceServiceFactory| Constructor and Description |
|---|
OAuth20AuthorizeEndpointController(org.apereo.cas.services.ServicesManager servicesManager,
org.apereo.cas.ticket.registry.TicketRegistry ticketRegistry,
AccessTokenFactory accessTokenFactory,
org.apereo.cas.authentication.principal.PrincipalFactory principalFactory,
org.apereo.cas.authentication.principal.ServiceFactory<org.apereo.cas.authentication.principal.WebApplicationService> webApplicationServiceServiceFactory,
OAuthCodeFactory oAuthCodeFactory,
ConsentApprovalViewResolver consentApprovalViewResolver,
OAuth20ProfileScopeToAttributesFilter scopeToAttributesFilter,
org.apereo.cas.configuration.CasConfigurationProperties casProperties,
org.apereo.cas.web.support.CookieRetrievingCookieGenerator ticketGrantingTicketCookieGenerator,
OAuth20CasAuthenticationBuilder authenticationBuilder,
java.util.Set<OAuth20AuthorizationResponseBuilder> oauthAuthorizationResponseBuilders,
java.util.Set<OAuth20AuthorizationRequestValidator> oauthRequestValidators,
org.apereo.cas.audit.AuditableExecution registeredServiceAccessStrategyEnforcer) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.web.servlet.View |
buildAuthorizationForRequest(org.apereo.cas.support.oauth.services.OAuthRegisteredService registeredService,
org.pac4j.core.context.J2EContext context,
java.lang.String clientId,
org.apereo.cas.authentication.principal.Service service,
org.apereo.cas.authentication.Authentication authentication)
Build callback url for request string.
|
protected org.apereo.cas.support.oauth.services.OAuthRegisteredService |
getRegisteredServiceByClientId(java.lang.String clientId)
Gets registered service by client id.
|
org.springframework.web.servlet.ModelAndView |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle request via GET.
|
org.springframework.web.servlet.ModelAndView |
handleRequestPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle request post.
|
protected org.springframework.web.servlet.ModelAndView |
redirectToCallbackRedirectUrl(org.pac4j.core.profile.ProfileManager manager,
org.apereo.cas.support.oauth.services.OAuthRegisteredService registeredService,
org.pac4j.core.context.J2EContext context,
java.lang.String clientId)
Redirect to callback redirect url model and view.
|
protected final OAuthCodeFactory oAuthCodeFactory
protected final ConsentApprovalViewResolver consentApprovalViewResolver
protected final OAuth20CasAuthenticationBuilder authenticationBuilder
protected final java.util.Set<OAuth20AuthorizationResponseBuilder> oauthAuthorizationResponseBuilders
protected final java.util.Set<OAuth20AuthorizationRequestValidator> oauthRequestValidators
protected final org.apereo.cas.audit.AuditableExecution registeredServiceAccessStrategyEnforcer
public OAuth20AuthorizeEndpointController(org.apereo.cas.services.ServicesManager servicesManager,
org.apereo.cas.ticket.registry.TicketRegistry ticketRegistry,
AccessTokenFactory accessTokenFactory,
org.apereo.cas.authentication.principal.PrincipalFactory principalFactory,
org.apereo.cas.authentication.principal.ServiceFactory<org.apereo.cas.authentication.principal.WebApplicationService> webApplicationServiceServiceFactory,
OAuthCodeFactory oAuthCodeFactory,
ConsentApprovalViewResolver consentApprovalViewResolver,
OAuth20ProfileScopeToAttributesFilter scopeToAttributesFilter,
org.apereo.cas.configuration.CasConfigurationProperties casProperties,
org.apereo.cas.web.support.CookieRetrievingCookieGenerator ticketGrantingTicketCookieGenerator,
OAuth20CasAuthenticationBuilder authenticationBuilder,
java.util.Set<OAuth20AuthorizationResponseBuilder> oauthAuthorizationResponseBuilders,
java.util.Set<OAuth20AuthorizationRequestValidator> oauthRequestValidators,
org.apereo.cas.audit.AuditableExecution registeredServiceAccessStrategyEnforcer)
@GetMapping(path="/oauth2.0/authorize")
public org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
request - the requestresponse - the responsejava.lang.Exception - the exception@PostMapping(path="/oauth2.0/authorize")
public org.springframework.web.servlet.ModelAndView handleRequestPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
request - the requestresponse - the responsejava.lang.Exception - the exceptionprotected org.apereo.cas.support.oauth.services.OAuthRegisteredService getRegisteredServiceByClientId(java.lang.String clientId)
clientId - the client idprotected org.springframework.web.servlet.ModelAndView redirectToCallbackRedirectUrl(org.pac4j.core.profile.ProfileManager manager,
org.apereo.cas.support.oauth.services.OAuthRegisteredService registeredService,
org.pac4j.core.context.J2EContext context,
java.lang.String clientId)
manager - the managerregisteredService - the registered servicecontext - the contextclientId - the client idprotected org.springframework.web.servlet.View buildAuthorizationForRequest(org.apereo.cas.support.oauth.services.OAuthRegisteredService registeredService,
org.pac4j.core.context.J2EContext context,
java.lang.String clientId,
org.apereo.cas.authentication.principal.Service service,
org.apereo.cas.authentication.Authentication authentication)
registeredService - the registered servicecontext - the contextclientId - the client idservice - the serviceauthentication - the authentication