public class AttributeAuthorityCLI extends Object
MetadataProvider
it uses under the bean name SAMLMetadataProvider, a
SAML1AttributeAuthority
under the bean name SAML1AttributeAuthority, and a SAML2AttributeAuthority
under the bean name SAML2AttributeAuthority.Modifier and Type | Class and Description |
---|---|
private static class |
AttributeAuthorityCLI.CLIParserBuilder
Helper class that creates the command line argument parser.
|
Modifier and Type | Field and Description |
---|---|
private static String[] |
aacliConfigs
List of assumed Spring configuration files used with the AACLI.
|
private static org.slf4j.Logger |
log
Class logger.
|
private static String |
protocol
Protocol String.
|
private static SAML1AttributeAuthority |
saml1AA
Loaded SAML 1 Attribute Authority.
|
private static SAML2AttributeAuthority |
saml2AA
Loaded SAML 2 Attribute Authority.
|
Constructor and Description |
---|
AttributeAuthorityCLI() |
Modifier and Type | Method and Description |
---|---|
private static BaseSAMLProfileRequestContext |
buildAttributeRequestContext(jargs.gnu.CmdLineParser parser,
org.springframework.context.ApplicationContext appCtx)
Builds the attribute request context from the command line arguments.
|
private static void |
errorAndExit(String errorMessage,
Exception e)
Logs, as an error, the error message and exits the program.
|
private static org.springframework.context.ApplicationContext |
loadConfigurations(String configDir,
String springExts)
Loads the configuration files into a Spring application context.
|
private static void |
loadLoggingConfiguration(String configDir)
Loads the logging configuration.
|
static void |
main(String[] args)
Runs this application.
|
private static jargs.gnu.CmdLineParser |
parseCommandArguments(String[] args)
Parses the command line arguments
|
private static SAMLObject |
performSAML1AttributeResolution(jargs.gnu.CmdLineParser parser,
org.springframework.context.ApplicationContext appCtx)
Constructs a SAML 1 attribute statement with the retrieved and filtered attributes.
|
private static SAMLObject |
performSAML2AttributeResolution(jargs.gnu.CmdLineParser parser,
org.springframework.context.ApplicationContext appCtx)
Constructs a SAML 2 attribute statement with the retrieved and filtered attributes.
|
private static void |
printAttributeStatement(SAMLObject attributeStatement)
Prints the given attribute statement to system output.
|
private static void |
printHelp(PrintStream out)
Prints a help message to the given output stream.
|
private static org.slf4j.Logger log
private static String[] aacliConfigs
private static SAML1AttributeAuthority saml1AA
private static SAML2AttributeAuthority saml2AA
private static String protocol
public static void main(String[] args) throws Exception
args
- command line argumentsException
- thrown if there is a problem during program executionprivate static jargs.gnu.CmdLineParser parseCommandArguments(String[] args) throws Exception
args
- command line argumentsException
- thrown if the underlying libraries could not be initializedprivate static org.springframework.context.ApplicationContext loadConfigurations(String configDir, String springExts) throws IOException, ResourceException
configDir
- directory containing spring configuration filesspringExts
- colon-separated list of spring extension filesIOException
- throw if there is an error loading the configuration filesResourceException
- if there is an error loading the configuration filesprivate static void loadLoggingConfiguration(String configDir)
configDir
- IdP configuration directoryprivate static SAMLObject performSAML1AttributeResolution(jargs.gnu.CmdLineParser parser, org.springframework.context.ApplicationContext appCtx)
parser
- command line argumentsappCtx
- spring application context with loaded attribute authorityprivate static SAMLObject performSAML2AttributeResolution(jargs.gnu.CmdLineParser parser, org.springframework.context.ApplicationContext appCtx)
parser
- command line argumentsappCtx
- spring application context with loaded attribute authorityprivate static BaseSAMLProfileRequestContext buildAttributeRequestContext(jargs.gnu.CmdLineParser parser, org.springframework.context.ApplicationContext appCtx)
parser
- command line argument parserappCtx
- spring application contextprivate static void printAttributeStatement(SAMLObject attributeStatement)
attributeStatement
- attribute statement to printprivate static void printHelp(PrintStream out)
out
- output to print the help message toCopyright © 1999-2012. All Rights Reserved.