public class AuthorizeCallback extends Object implements Callback, Serializable
SaslServer
to determine whether
one entity (identified by an authenticated authentication id)
can act on
behalf of another entity (identified by an authorization id).Constructor and Description |
---|
AuthorizeCallback(String authnID,
String authzID)
Constructs an instance of
AuthorizeCallback . |
Modifier and Type | Method and Description |
---|---|
String |
getAuthenticationID()
Returns the authentication id to check.
|
String |
getAuthorizationID()
Returns the authorization id to check.
|
String |
getAuthorizedID()
Returns the id of the authorized user.
|
boolean |
isAuthorized()
Determines whether the authentication id is allowed to
act on behalf of the authorization id.
|
void |
setAuthorized(boolean ok)
Sets whether the authorization is allowed.
|
void |
setAuthorizedID(String id)
Sets the id of the authorized entity.
|
public String getAuthenticationID()
public String getAuthorizationID()
public boolean isAuthorized()
true
if authorization is allowed; false
otherwisesetAuthorized(boolean)
,
getAuthorizedID()
public void setAuthorized(boolean ok)
ok
- true
if authorization is allowed; false
otherwiseisAuthorized()
,
setAuthorizedID(java.lang.String)
public String getAuthorizedID()
null
means the
authorization failed.setAuthorized(boolean)
,
setAuthorizedID(java.lang.String)
public void setAuthorizedID(String id)
id
- The id of the authorized user.setAuthorized(boolean)
,
getAuthorizedID()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2024, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.