Class OldTemplateResolver
- java.lang.Object
-
- org.oa4mp.server.loader.oauth2.tokens.OldTemplateResolver
-
public class OldTemplateResolver extends Object
This will take a template (which is just a string with wildcards and a few other items) and resolve it against a given target.
E.g. if the template isa/b/c/${user}/data/**
and the target isa/b/c/bob/data/file.dat
then this would resolve true if the user is named "bob" and fail otherwise.Created by Jeff Gaynor
on 9/11/18 at 6:08 PM
-
-
Field Summary
Fields Modifier and Type Field Description static String
ST_GROUP_NAME
static String
ST_USER_NAME
-
Constructor Summary
Constructors Constructor Description OldTemplateResolver(String username, Groups group)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
check(String template, String target)
The template is stored in the configuration.protected boolean
hasGroups()
protected boolean
hasUsername()
List<String>
resolve(AuthorizationTemplates authorizationTemplates, String audience, Collection<String> scopes)
-
-
-
Field Detail
-
ST_GROUP_NAME
public static final String ST_GROUP_NAME
- See Also:
- Constant Field Values
-
ST_USER_NAME
public static final String ST_USER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolve
public List<String> resolve(AuthorizationTemplates authorizationTemplates, String audience, Collection<String> scopes)
- Parameters:
authorizationTemplates
-audience
- The requested audiencescopes
- The requested scope in claims format.- Returns:
-
hasGroups
protected boolean hasGroups()
-
hasUsername
protected boolean hasUsername()
-
-