org.springframework.security.oauth2.config
Class OAuth2ClientContextFactoryBean
java.lang.Object
org.springframework.security.oauth2.config.OAuth2ClientContextFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.FactoryBean<OAuth2ClientContext>
public class OAuth2ClientContextFactoryBean
- extends Object
- implements org.springframework.beans.factory.FactoryBean<OAuth2ClientContext>
Convenience factory for OAuth2ClientContext that is aware of the need for a different context if the resource is for a
client credentials grant. Client credentials grants will always have the same credentials for all requests, so
there's no point protecting the context with session and request scopes.
- Author:
- Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuth2ClientContextFactoryBean
public OAuth2ClientContextFactoryBean()
setResource
public void setResource(OAuth2ProtectedResourceDetails resource)
- Parameters:
resource - the resource to set
setScopedContext
public void setScopedContext(OAuth2ClientContext scopedContext)
- Parameters:
scopedContext - the scopedContext to set
setBareContext
public void setBareContext(OAuth2ClientContext bareContext)
- Parameters:
bareContext - the bareContext to set
getObject
public OAuth2ClientContext getObject()
throws Exception
- Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<OAuth2ClientContext>
- Throws:
Exception
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<OAuth2ClientContext>
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<OAuth2ClientContext>
Copyright © 2013. All rights reserved.