/** * Issues a Security Token for the ultimate recipient of the token. * * @param endpointURI - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @return Element - The Security Token Element which will be of the TokenType configured for the endpointURI passed in. * @throws WSTrustException */ public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException { RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); return issueToken(request); }
/** * Issues a Security Token for the ultimate recipient of the token. * * @param endpointURI * - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @return Element - The Security Token Element which will be of the TokenType configured for the endpointURI passed * in. * @throws WSTrustException */ public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException { RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); return issueToken(request); }
/** * Issues a Security Token for the ultimate recipient of the token. * * @param endpointURI - The ultimate recipient of the token. This will be set at the AppliesTo for the * RequestSecurityToken * which is an optional element so it may be null. * * @return Element - The Security Token Element which will be of the TokenType configured for the endpointURI passed * in. * * @throws WSTrustException */ public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException { RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); return issueToken(request); }
/** * Issues a Security Token from the STS. This methods has the option of specifying one or both of * endpointURI/tokenType but at least one must specified. * * @param endpointURI * - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @param tokenType * - The type of security token to be issued. * @return Element - The Security Token Element issued. * @throws IllegalArgumentException * If neither endpointURI nor tokenType was specified. * @throws WSTrustException */ public Element issueToken(String endpointURI, String tokenType) throws WSTrustException { if (endpointURI == null && tokenType == null) throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); return issueToken(request); }
/** * Issues a Security Token for the ultimate recipient of the token. * * @param endpointURI - The ultimate recipient of the token. This will be set at the AppliesTo for the * RequestSecurityToken * which is an optional element so it may be null. * * @return Element - The Security Token Element which will be of the TokenType configured for the endpointURI passed * in. * * @throws WSTrustException */ public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException { RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); return issueToken(request); }
/** * Issues a Security Token for the ultimate recipient of the token. * * @param endpointURI * - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @return Element - The Security Token Element which will be of the TokenType configured for the endpointURI passed * in. * @throws WSTrustException */ public Element issueTokenForEndpoint(String endpointURI) throws WSTrustException { RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); return issueToken(request); }
/** * Issues a Security Token from the STS. This methods has the option of specifying one or both of * endpointURI/tokenType but at least one must specified. * * @param endpointURI * - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @param tokenType * - The type of security token to be issued. * @return Element - The Security Token Element issued. * @throws IllegalArgumentException * If neither endpointURI nor tokenType was specified. * @throws WSTrustException */ public Element issueToken(String endpointURI, String tokenType) throws WSTrustException { if (endpointURI == null && tokenType == null) throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); return issueToken(request); }
setAppliesTo(endpointURI, request); setTokenType(tokenType, request); setOnBehalfOf(principal, request);
setAppliesTo(endpointURI, request); setTokenType(tokenType, request); setOnBehalfOf(principal, request);
/** * Issues a Security Token from the STS. This methods has the option of specifying one or both of endpointURI/tokenType but * at least one must specified. * * @param endpointURI - The ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @param tokenType - The type of security token to be issued. * @return Element - The Security Token Element issued. * @throws IllegalArgumentException If neither endpointURI nor tokenType was specified. * @throws WSTrustException */ public Element issueToken(String endpointURI, String tokenType) throws WSTrustException { if (endpointURI == null && tokenType == null) throw logger.nullArgumentError("endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); return issueToken(request); }
/** * Issues a Security Token from the STS. This methods has the option of specifying one or both of * endpointURI/tokenType but * at least one must specified. * * @param endpointURI - The ultimate recipient of the token. This will be set at the AppliesTo for the * RequestSecurityToken * which is an optional element so it may be null. * @param tokenType - The type of security token to be issued. * * @return Element - The Security Token Element issued. * * @throws IllegalArgumentException If neither endpointURI nor tokenType was specified. * @throws WSTrustException */ public Element issueToken(String endpointURI, String tokenType) throws WSTrustException { if (endpointURI == null && tokenType == null) throw logger.nullArgumentError("endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); return issueToken(request); }
/** * Issues a Security Token from the STS. This methods has the option of specifying one or both of * endpointURI/tokenType but * at least one must specified. * * @param endpointURI - The ultimate recipient of the token. This will be set at the AppliesTo for the * RequestSecurityToken * which is an optional element so it may be null. * @param tokenType - The type of security token to be issued. * * @return Element - The Security Token Element issued. * * @throws IllegalArgumentException If neither endpointURI nor tokenType was specified. * @throws WSTrustException */ public Element issueToken(String endpointURI, String tokenType) throws WSTrustException { if (endpointURI == null && tokenType == null) throw logger.nullArgumentError("endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); return issueToken(request); }
/** * <p> * Issues a security token on behalf of the specified principal. * </p> * * @param endpointURI the ultimate recipient of the token. This will be set at the AppliesTo for the RequestSecurityToken * which is an optional element so it may be null. * @param tokenType the type of the token to be issued. * @param principal the {@code Principal} to whom the token will be issued. * @return an {@code Element} representing the issued security token. * @throws IllegalArgumentException If neither endpointURI nor tokenType was specified. * @throws WSTrustException if an error occurs while issuing the security token. */ public Element issueTokenOnBehalfOf(String endpointURI, String tokenType, Principal principal) throws WSTrustException { if (endpointURI == null && tokenType == null) throw logger.nullArgumentError("endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); setOnBehalfOf(principal, request); return issueToken(request); }
/** * <p> * Issues a security token on behalf of the specified principal. * </p> * * @param endpointURI the ultimate recipient of the token. This will be set at the AppliesTo for the * RequestSecurityToken * which is an optional element so it may be null. * @param tokenType the type of the token to be issued. * @param principal the {@code Principal} to whom the token will be issued. * * @return an {@code Element} representing the issued security token. * * @throws IllegalArgumentException If neither endpointURI nor tokenType was specified. * @throws WSTrustException if an error occurs while issuing the security token. */ public Element issueTokenOnBehalfOf(String endpointURI, String tokenType, Principal principal) throws WSTrustException { if (endpointURI == null && tokenType == null) throw logger.nullArgumentError("endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); setOnBehalfOf(principal, request); return issueToken(request); }
/** * <p> * Issues a security token on behalf of the specified principal. * </p> * * @param endpointURI the ultimate recipient of the token. This will be set at the AppliesTo for the * RequestSecurityToken * which is an optional element so it may be null. * @param tokenType the type of the token to be issued. * @param principal the {@code Principal} to whom the token will be issued. * * @return an {@code Element} representing the issued security token. * * @throws IllegalArgumentException If neither endpointURI nor tokenType was specified. * @throws WSTrustException if an error occurs while issuing the security token. */ public Element issueTokenOnBehalfOf(String endpointURI, String tokenType, Principal principal) throws WSTrustException { if (endpointURI == null && tokenType == null) throw logger.nullArgumentError("endpointURI or tokenType"); RequestSecurityToken request = new RequestSecurityToken(); if (wsaIssuerAddress != null) { request.setIssuer(WSTrustUtil.createIssuer(wsaIssuerAddress)); } setAppliesTo(endpointURI, request); setTokenType(tokenType, request); setOnBehalfOf(principal, request); return issueToken(request); }