ClaimsIdentity Class

  • java.lang.Object
    • com.microsoft.bot.connector.authentication.ClaimsIdentity

public class ClaimsIdentity

This is a simple wrapper around for a JWT claims identity.

Constructor Summary

Constructor Description
ClaimsIdentity(DecodedJWT jwt)

Extract data from an auth0 JWT.

ClaimsIdentity(String withAuthIssuer)

Manually construct with auth issuer.

ClaimsIdentity(String withAuthIssuer, String withType, Map<String,String> withClaims)

Manually construct with issuer and claims.

ClaimsIdentity(String withAuthIssuer, Map<String,String> withClaims)

Manually construct with issuer and claims.

Method Summary

Modifier and Type Method and Description
java.util.Map<java.lang.String,java.lang.String> claims()

The claims for this identity.

java.lang.String getIssuer()

The issuer.

java.lang.String getType()

The type.

boolean isAuthenticated()

Gets whether the claim is authenticated.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ClaimsIdentity

public ClaimsIdentity(DecodedJWT jwt)

Extract data from an auth0 JWT.

Parameters:

jwt - The decoded JWT.

ClaimsIdentity

public ClaimsIdentity(String withAuthIssuer)

Manually construct with auth issuer.

Parameters:

withAuthIssuer - The auth issuer.

ClaimsIdentity

public ClaimsIdentity(String withAuthIssuer, String withType, Map withClaims)

Manually construct with issuer and claims.

Parameters:

withAuthIssuer - The auth issuer.
withType - The auth type.
withClaims - A Map of claims.

ClaimsIdentity

public ClaimsIdentity(String withAuthIssuer, Map withClaims)

Manually construct with issuer and claims.

Parameters:

withAuthIssuer - The auth issuer.
withClaims - A Map of claims.

Method Details

claims

public Map claims()

The claims for this identity.

Returns:

A Map of claims.

getIssuer

public String getIssuer()

The issuer.

Returns:

The issuer.

getType

public String getType()

The type.

Returns:

The type.

isAuthenticated

public boolean isAuthenticated()

Gets whether the claim is authenticated.

Returns:

true if authenticated.

Applies to