Class OA2ClientCommands

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable, edu.uiuc.ncsa.security.util.cli.Commands

    public class OA2ClientCommands
    extends ClientStoreCommands

    Created by Jeff Gaynor
    on 4/3/14 at 3:24 PM

    • Field Detail

      • NO_STILE_FLAG

        public static String NO_STILE_FLAG
      • END_COMMENT_INPUT_CHAR

        public static String END_COMMENT_INPUT_CHAR
      • ABORT_COMMENT_INPUT_CHAR

        public static String ABORT_COMMENT_INPUT_CHAR
      • UUC_FLAG_TEST

        public static String UUC_FLAG_TEST
      • UUC_FLAG_CFG

        public static String UUC_FLAG_CFG
      • UUC_FLAG_FOUND

        public static String UUC_FLAG_FOUND
      • UUC_FLAG_ENABLE

        public static String UUC_FLAG_ENABLE
      • E_CREATE_FLAG

        public static String E_CREATE_FLAG
      • E_LINK_FLAG

        public static String E_LINK_FLAG
      • E_LIST_FLAG

        public static String E_LIST_FLAG
      • E_LIST_AS_ARRAY_FLAG

        public static String E_LIST_AS_ARRAY_FLAG
      • E_LIST_AS_JSON_FLAG

        public static String E_LIST_AS_JSON_FLAG
      • E_LIST_AS_MULTILINE_FLAG

        public static String E_LIST_AS_MULTILINE_FLAG
      • E_UNLINK_FLAG

        public static String E_UNLINK_FLAG
      • E_ADMIN_ID_FLAG

        public static String E_ADMIN_ID_FLAG
      • ERSATZ_CREATE_MAGIC_NUMBER

        public static final int ERSATZ_CREATE_MAGIC_NUMBER
        See Also:
        Constant Field Values
    • Constructor Detail

      • OA2ClientCommands

        public OA2ClientCommands​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger,
                                 String defaultIndent,
                                 edu.uiuc.ncsa.security.core.Store clientStore,
                                 ClientApprovalStoreCommands clientApprovalStoreCommands,
                                 edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.PermissionsStore permissionsStore)
                          throws Throwable
        Throws:
        Throwable
      • OA2ClientCommands

        public OA2ClientCommands​(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger,
                                 edu.uiuc.ncsa.security.core.Store store)
                          throws Throwable
        Throws:
        Throwable
    • Method Detail

      • getPermissionsStore

        public edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.PermissionsStore getPermissionsStore()
      • setPermissionsStore

        public void setPermissionsStore​(edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.PermissionsStore permissionsStore)
      • setUucConfiguration

        public void setUucConfiguration​(UUCConfiguration uucConfiguration)
      • isRefreshTokensEnabled

        public boolean isRefreshTokensEnabled()
      • setRefreshTokensEnabled

        public void setRefreshTokensEnabled​(boolean refreshTokensEnabled)
      • setSupportedScopes

        public void setSupportedScopes​(Collection<String> supportedScopes)
      • showCBHelp

        protected void showCBHelp()
      • cb

        public void cb​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                throws IOException
        Throws:
        IOException
      • getCBS

        protected Collection<String> getCBS​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
      • extraUpdates

        public void extraUpdates​(edu.uiuc.ncsa.security.core.Identifiable identifiable,
                                 int magicNumber)
                          throws IOException
        In this case, the secret has to be gotten and processed into a hash, callback uris listed and the refresh token lifetime set.

        Caveat: This is also called for mass updates, not just create so always check for existing values.

        Overrides:
        extraUpdates in class ClientStoreCommands
        Parameters:
        identifiable -
        Throws:
        IOException
      • processCommaSeparatedList

        protected List<String> processCommaSeparatedList​(String key,
                                                         List<String> legalValues,
                                                         String moniker,
                                                         String defaultValue)
                                                  throws IOException
        Prompt for a comma separated list, parse it an return it. The moniker identifies what goes on the list, the legalValues (if present) restrict the values to what is on that list.
        Parameters:
        legalValues -
        moniker -
        defaultValue -
        Returns:
        Throws:
        IOException
      • supportsQDL

        protected boolean supportsQDL()
        Overrides:
        supportsQDL in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
      • showDeserializeHelp

        protected void showDeserializeHelp()
        Overrides:
        showDeserializeHelp in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
      • updateSingleValue

        protected boolean updateSingleValue​(edu.uiuc.ncsa.security.storage.XMLMap map,
                                            String key)
                                     throws IOException
        Overrides:
        updateSingleValue in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
        Throws:
        IOException
      • get_comment

        public void get_comment​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                         throws Throwable
        Throws:
        Throwable
      • set_comment

        public void set_comment​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                         throws Throwable
        Throws:
        Throwable
      • resolve

        public void resolve​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                     throws Exception
        Throws:
        Exception
      • showSerializeHelp

        protected void showSerializeHelp()
        Overrides:
        showSerializeHelp in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
      • serialize

        public void serialize​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
        Overrides:
        serialize in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
      • ea_support

        public void ea_support​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                        throws Exception
        Throws:
        Exception
      • bootstrap

        public void bootstrap()
                       throws Throwable
        Specified by:
        bootstrap in interface edu.uiuc.ncsa.security.util.cli.Commands
        Overrides:
        bootstrap in class edu.uiuc.ncsa.security.storage.cli.StoreCommands
        Throws:
        Throwable
      • showErsatzHelp

        protected void showErsatzHelp()
      • ersatz

        public void ersatz​(edu.uiuc.ncsa.security.util.cli.InputLine inputLine)
                    throws Throwable
        Throws:
        Throwable
      • linkErsatz

        protected void linkErsatz​(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.storage.clients.OA2Client provisioner,
                                  edu.uiuc.ncsa.security.core.Identifier adminID,
                                  List<edu.uiuc.ncsa.security.core.Identifier> ersatz)
      • hasEChain

        protected boolean hasEChain​(edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.PermissionList permissions,
                                    List<edu.uiuc.ncsa.security.core.Identifier> eChain)
      • unlinkErsatz

        protected void unlinkErsatz​(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.storage.clients.OA2Client provisioner,
                                    edu.uiuc.ncsa.security.core.Identifier adminID,
                                    List<edu.uiuc.ncsa.security.core.Identifier> ersatz)
      • preCreation

        protected edu.uiuc.ncsa.security.core.Identifiable preCreation​(edu.uiuc.ncsa.security.core.Identifiable identifiable,
                                                                       int magicNumber)
        Overrides:
        preCreation in class edu.uiuc.ncsa.security.storage.cli.StoreCommands