Class BaseService

    • Constructor Detail

      • BaseService

        public BaseService()
    • Method Detail

      • getToken

        public io.jans.as.client.TokenResponse getToken​(io.jans.as.client.TokenRequest tokenRequest,
                                                        String tokenEndpoint)
      • getToken

        public io.jans.as.client.TokenResponse getToken​(io.jans.as.client.TokenRequest tokenRequest,
                                                        String tokenEndpoint,
                                                        String userInfoJwt,
                                                        List<String> permissionTags)
        This Java function sends a token request to a specified endpoint and returns the token response if successful.
        Parameters:
        tokenRequest - The `getToken` method you provided is used to exchange authorization code for an access token. The `TokenRequest` parameter contains information required for this token exchange process, such as code, scope, grant type, redirect URI, client ID, etc.
        tokenEndpoint - The `tokenEndpoint` parameter in the `getToken` method is the URL where the token request will be sent to in order to obtain an access token. This URL typically belongs to the authorization server that issues the access tokens.
        userInfoJwt - The `userInfoJwt` parameter in the `getToken` method is a JSON Web Token (JWT) that contains user information. This token is typically used to provide information about the authenticated user to the authorization server when requesting an access token. The user information in the JWT can include details such as the user
        permissionTags - The `permissionTags` parameter in the `getToken` method is a list of strings that represent permission tags. These permission tags are used to specify the permissions that the client application is requesting. The method processes these permission tags and includes them in the request body when making a call to the token endpoint.
        Returns:
        The method is returning a `io.jans.as.client.TokenResponse` object.
      • executeDCR

        public DCRResponse executeDCR​(String ssaJwt)
        It takes a software statement assertion (SSA) as input, and returns a client ID and client secret
        Parameters:
        ssaJwt - The Software Statement Assertion (SSA) JWT that you received from the Scan server.
        Returns:
        The client id and client secret of the newly created client.
      • getClaims

        public Map<String,​Object> getClaims​(io.jans.as.model.jwt.Jwt jwtObj)
        It takes a JWT object and returns a Map of the claims
        Parameters:
        jwtObj - The JWT object that you want to get the claims from.
        Returns:
        A map of claims.