Package org.jenkinsci.plugins.oic.avatar
Class ServeFromURLAvatarHandler
java.lang.Object
hudson.model.AbstractDescribableImpl<AvatarHandler>
org.jenkinsci.plugins.oic.avatar.AvatarHandler
org.jenkinsci.plugins.oic.avatar.ServeFromURLAvatarHandler
- All Implemented Interfaces:
ExtensionPoint,Describable<AvatarHandler>,Serializable
Records the URL advertised by the provider as-is, so that each user's browser fetches the image
directly from the provider.
As the image is fetched by the browser rather than by the controller, the
URL must be reachable from every user's browser, and the provider's domain ends up in the
img-src Content Security Policy directive.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleAvatar(OicSecurityRealm realm, User user, String avatarUrl) Record, refresh or clear the avatar foruser.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
ServeFromURLAvatarHandler
@DataBoundConstructor public ServeFromURLAvatarHandler()
-
-
Method Details
-
handleAvatar
public void handleAvatar(@NonNull OicSecurityRealm realm, @NonNull User user, @CheckForNull String avatarUrl) throws IOException Description copied from class:AvatarHandlerRecord, refresh or clear the avatar foruser.Called on the login request thread, so implementations must return promptly: anything needing network IO must be handled asynchronously.
- Specified by:
handleAvatarin classAvatarHandler- Parameters:
avatarUrl- the value of the provider's avatar claim, ornullif it was not present.- Throws:
IOException
-