38 parent::__construct(
'OATH',
'',
false );
39 $this->OATHRepository = $repository;
53 $form->setMessagePrefix(
'oathauth' );
54 $form->setWrapperLegend(
false );
55 $form->getOutput()->setPageTitle( $this->
msg(
'oathauth-disable' ) );
80 parent::checkExecutePermissions( $user );
92 'label-message' =>
'oathauth-entertoken',
99 'default' => $this->
getRequest()->getVal(
'returnto' ),
100 'name' =>
'returnto',
104 'default' => $this->
getRequest()->getVal(
'returntoquery' ),
105 'name' =>
'returntoquery',
119 return [
'oathauth-throttled', Message::durationParam( 60 ) ];
122 if ( !$this->
OATHUser->
getKey()->verifyToken( $formData[
'token'], $this->OATHUser ) ) {
123 return [
'oathauth-failedtovalidateoath' ];
127 $this->OATHRepository->remove( $this->
OATHUser );
133 $this->
getOutput()->addWikiMsg(
'oathauth-disabledoath' );
Special page which uses an HTMLForm to handle processing.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
getKey()
Get the key associated with this user.
setKey(OATHAuthKey $key=null)
Set the key associated with this user.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
checkExecutePermissions(User $user)
Require users to be logged in.
__construct(OATHUserRepository $repository, OATHUser $user)
Initialize the OATH user based on the current local User object in the context.
onSubmit(array $formData)
doesWrites()
Indicates whether this special page may perform database writes.
onSuccess()
Do something exciting on successful processing of the form, most likely to show a confirmation messag...
alterForm(HTMLForm $form)
Set the page title and add JavaScript RL modules.
OATHUserRepository $OATHRepository
getOutput()
Get the OutputPage being used for this instance.
requireLogin( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin')
If the user is not logged in, throws UserNotLoggedIn error.
msg( $key)
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))