Class OA2TokenForge

  • All Implemented Interfaces:
    org.oa4mp.delegation.common.token.TokenForge

    public class OA2TokenForge
    extends Object
    implements org.oa4mp.delegation.common.token.TokenForge

    Created by Jeff Gaynor
    on 6/4/13 at 4:21 PM

    • Constructor Detail

      • OA2TokenForge

        public OA2TokenForge​(String server)
    • Method Detail

      • createToken

        public org.oa4mp.delegation.common.token.impl.AuthorizationGrantImpl createToken​(AGRequest2 request)
      • createToken

        public org.oa4mp.delegation.common.token.impl.AccessTokenImpl createToken​(ATRequest request)
      • createToken

        public org.oa4mp.delegation.common.token.impl.RefreshTokenImpl createToken​(RTIRequest request)
      • metaCT

        protected URI metaCT​(IssuerRequest request,
                             edu.uiuc.ncsa.security.core.util.IP2 ip2)
        Does some grunt work of figuring out the lifetime then creates the URI. This is the token and is used to create the various implementations.
        Parameters:
        request -
        ip2 -
        Returns:
      • authzGrant

        protected String authzGrant​(String... x)
        This and similarly named methods are provided so you can override the specific path components and enforce your own semantics on the tokens. Note that these are called once and are immutable after that. If you need something really exotic you should override the setup() method.
        Returns:
      • accessToken

        protected String accessToken​(String... x)
      • refreshToken

        protected String refreshToken​(String... x)
      • getServer

        public String getServer()
      • getServerURI

        protected URI getServerURI()
      • getAccessToken

        public org.oa4mp.delegation.common.token.AccessToken getAccessToken​(Map<String,​String> parameters)
        Specified by:
        getAccessToken in interface org.oa4mp.delegation.common.token.TokenForge
      • getStringType

        public String getStringType​(String x)
        Takes a token (as a string) and returns a human-readable type of token. This is intended to be used in, e.g., logging applications.
        Parameters:
        x -
        Returns:
      • getType

        public int getType​(String x)
      • getAuthorizationGrant

        public org.oa4mp.delegation.common.token.AuthorizationGrant getAuthorizationGrant​(Map<String,​String> parameters)
        Specified by:
        getAuthorizationGrant in interface org.oa4mp.delegation.common.token.TokenForge
      • getAuthorizationGrant

        public org.oa4mp.delegation.common.token.AuthorizationGrant getAuthorizationGrant​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getAuthorizationGrant in interface org.oa4mp.delegation.common.token.TokenForge
      • getAuthorizationGrant

        public org.oa4mp.delegation.common.token.AuthorizationGrant getAuthorizationGrant​(String... tokens)
        Specified by:
        getAuthorizationGrant in interface org.oa4mp.delegation.common.token.TokenForge
      • getIDToken

        public org.oa4mp.delegation.common.token.impl.TokenImpl getIDToken​(String... tokens)
      • getAccessToken

        public org.oa4mp.delegation.common.token.AccessToken getAccessToken​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getAccessToken in interface org.oa4mp.delegation.common.token.TokenForge
      • getAgIdProvider

        public edu.uiuc.ncsa.security.core.util.IP2<edu.uiuc.ncsa.security.core.Identifier> getAgIdProvider()
      • getAtIdProvider

        public edu.uiuc.ncsa.security.core.util.IP2<edu.uiuc.ncsa.security.core.Identifier> getAtIdProvider()
      • getRefreshTokenProvider

        public edu.uiuc.ncsa.security.core.util.IP2<edu.uiuc.ncsa.security.core.Identifier> getRefreshTokenProvider()
      • getIDTokenProvider

        public edu.uiuc.ncsa.security.core.util.IP2<edu.uiuc.ncsa.security.core.Identifier> getIDTokenProvider()
      • getURI

        protected URI getURI​(String token)
      • getRefreshToken

        public org.oa4mp.delegation.common.token.impl.RefreshTokenImpl getRefreshToken​(String... tokens)
      • getAccessToken

        public org.oa4mp.delegation.common.token.impl.AccessTokenImpl getAccessToken​(String... tokens)
        Specified by:
        getAccessToken in interface org.oa4mp.delegation.common.token.TokenForge