
@Component @Path(value="/oidc") @PermitAll public class OpenIdConnectResource extends Object
| Modifier and Type | Field and Description |
|---|---|
private AuthenticationUriBuilder |
authenticationUriBuilder |
private URI |
authorizationEndpoint |
private javax.ws.rs.client.Client |
client |
private org.springframework.cache.CacheManager |
cm |
private net.trajano.ms.core.CryptoOps |
cryptoOps |
private static String |
ID_TOKEN
"id_token" key in the ID Token response.
|
private static org.slf4j.Logger |
LOG |
private org.springframework.cache.Cache |
serverStateCache |
private ServiceConfiguration |
serviceConfiguration |
| Constructor and Description |
|---|
OpenIdConnectResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
auth(String state,
String issuerId,
String authorization)
The state that is passed here is transformed to a JWT before passing to the
OIDC IP.
|
URI |
authUri(String state,
String issuerId,
String authorization) |
com.google.gson.JsonObject |
authUriJson(String state,
String issuerId,
String authorization) |
javax.ws.rs.core.Response |
callback(String code,
String jwtState,
String issuerId) |
private URI |
getRedirectUri(String authorization)
Gets the redirect URI from authorization endpoint.
|
void |
init() |
void |
setClient(javax.ws.rs.client.Client client) |
private static final String ID_TOKEN
private static final org.slf4j.Logger LOG
@Autowired private AuthenticationUriBuilder authenticationUriBuilder
@Value(value="${authorization.endpoint}")
private URI authorizationEndpoint
@Context private javax.ws.rs.client.Client client
@Autowired private org.springframework.cache.CacheManager cm
@Autowired private net.trajano.ms.core.CryptoOps cryptoOps
private org.springframework.cache.Cache serverStateCache
@Autowired private ServiceConfiguration serviceConfiguration
@Path(value="/auth/{issuer_id}")
@POST
@Consumes(value="application/x-www-form-urlencoded")
public javax.ws.rs.core.Response auth(@FormParam(value="state")
String state,
@PathParam(value="issuer_id")
String issuerId,
@HeaderParam(value="Authorization")
String authorization)
state - this is a client level stateissuerId - issuer@Path(value="/auth-uri/{issuer_id}")
@GET
@Produces(value="text/plain")
public URI authUri(@QueryParam(value="state")
String state,
@PathParam(value="issuer_id")
String issuerId,
@HeaderParam(value="Authorization")
String authorization)
@Path(value="/auth-info/{issuer_id}")
@GET
@Produces(value="application/json")
public com.google.gson.JsonObject authUriJson(@QueryParam(value="state")
String state,
@PathParam(value="issuer_id")
String issuerId,
@HeaderParam(value="Authorization")
String authorization)
@Path(value="/cb/{issuer_id}")
@GET
public javax.ws.rs.core.Response callback(@QueryParam(value="code")
String code,
@QueryParam(value="state")
String jwtState,
@PathParam(value="issuer_id")
String issuerId)
throws org.jose4j.jwt.MalformedClaimException
org.jose4j.jwt.MalformedClaimExceptionprivate URI getRedirectUri(String authorization)
authorization - authorization header@PostConstruct public void init()
public void setClient(javax.ws.rs.client.Client client)
Copyright © 2012–2018 Trajano. All rights reserved.