public SharedAuthenticatedUser retrieveSharedConnectionUser ( AuthenticationProvider authProvider , Credentials credentials ) { // Validate the share key String shareKey = getShareKey ( credentials ) ; if ( shareKey == null || connectionMap . get ( shareKey ) == null ) return null ; // Return temporary in-memory user return new SharedAuthenticatedUser ( authProvider , credentials , shareKey ) ; }
Returns a SharedAuthenticatedUser if the given credentials contain a valid share key . The returned user will be associated with the single shared connection to which they have been granted temporary access . If the share key is invalid or no share key is contained within the given credentials null is returned .